/*
 * @Author: zhangzhanyan 
 * @Date: 2021-07-23 16:43:31 
 * @Last Modified by: zhangzhnayan
 * @Last Modified time: 2021-07-23 20:06:52
 */

import React, { Component } from 'react';
import store from "../../store/index" 


class main extends Component<any,any> {
    render() {
        return (
            <div className="City-main">
                  {
                    this.props.chengshi.map((item:any, index:any) => {
                        return <div key={index}>
                                    <h2>{item.name}</h2>
                                    {
                                        item.citys.map((item2:any,index2:any)=>{
                                            return <li onClick={()=>{store.cityAdd(item2)}} key={index2}>{item2}</li>
                                        })
                                    }                                 
                                </div>
                    })
                }
            </div>
        );
    }
}

export default main;